<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude, MagicHash #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Numeric</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2002</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Odds and ends, mostly functions for reading and showing</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- 'RealFloat'-like kind of values.</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Numeric</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Showing</span></span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.Real.html#showSigned"><span class="hs-identifier">showSigned</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="Numeric.html#showIntAtBase"><span class="hs-identifier">showIntAtBase</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><a href="Numeric.html#showInt"><span class="hs-identifier">showInt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="Numeric.html#showHex"><span class="hs-identifier">showHex</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="Numeric.html#showOct"><span class="hs-identifier">showOct</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="Numeric.html#showEFloat"><span class="hs-identifier">showEFloat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="Numeric.html#showFFloat"><span class="hs-identifier">showFFloat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="Numeric.html#showGFloat"><span class="hs-identifier">showGFloat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="Numeric.html#showFFloatAlt"><span class="hs-identifier">showFFloatAlt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="Numeric.html#showGFloatAlt"><span class="hs-identifier">showGFloatAlt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Float.html#showFloat"><span class="hs-identifier">showFloat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="Numeric.html#showHFloat"><span class="hs-identifier">showHFloat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.Float.html#floatToDigits"><span class="hs-identifier">floatToDigits</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Reading</span></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span>        </span><span class="hs-comment">-- | /NB:/ 'readInt' is the \'dual\' of 'showIntAtBase',</span><span>
</span><span id="line-43"></span><span>        </span><span class="hs-comment">-- and 'readDec' is the \`dual\' of 'showInt'.</span><span>
</span><span id="line-44"></span><span>        </span><span class="hs-comment">-- The inconsistent naming is a historical accident.</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="Numeric.html#readSigned"><span class="hs-identifier">readSigned</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><a href="Numeric.html#readInt"><span class="hs-identifier">readInt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><a href="Numeric.html#readDec"><span class="hs-identifier">readDec</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>        </span><span class="annot"><a href="Numeric.html#readOct"><span class="hs-identifier">readOct</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><a href="Numeric.html#readHex"><span class="hs-identifier">readHex</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><a href="Numeric.html#readFloat"><span class="hs-identifier">readFloat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="GHC.Read.html#lexDigits"><span class="hs-identifier">lexDigits</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Miscellaneous</span></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><a href="GHC.Float.html#fromRat"><span class="hs-identifier">fromRat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>        </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier">Floating</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span>        </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Read.html"><span class="hs-identifier">GHC.Read</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Real.html"><span class="hs-identifier">GHC.Real</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Float.html"><span class="hs-identifier">GHC.Float</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html"><span class="hs-identifier">Text.ParserCombinators.ReadP</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier">ReadP</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#readP_to_S"><span class="hs-identifier">readP_to_S</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier">pfail</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Text.Read.Lex.html"><span class="hs-identifier">Text.Read.Lex</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">L</span></span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- $setup</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- &gt;&gt;&gt; import Prelude</span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- Reading</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="hs-comment">-- | Reads an /unsigned/ 'Integral' value in an arbitrary base.</span><span>
</span><span id="line-80"></span><span id="local-6989586621679487577"><span class="annot"><a href="Numeric.html#readInt"><span class="hs-identifier hs-type">readInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487577"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-81"></span><span>  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487577"><span class="hs-identifier hs-type">a</span></a></span><span>                  </span><span class="hs-comment">-- ^ the base</span><span>
</span><span id="line-82"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- ^ a predicate distinguishing valid digits in this base</span><span>
</span><span id="line-83"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span>      </span><span class="hs-comment">-- ^ a function converting a valid digit character to an 'Int'</span><span>
</span><span id="line-84"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier hs-type">ReadS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487577"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-85"></span><span id="readInt"><span class="annot"><span class="annottext">readInt :: forall a. Num a =&gt; a -&gt; (Char -&gt; Bool) -&gt; (Char -&gt; Int) -&gt; ReadS a
</span><a href="Numeric.html#readInt"><span class="hs-identifier hs-var hs-var">readInt</span></a></span></span><span> </span><span id="local-6989586621679487465"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487465"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679487464"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679487464"><span class="hs-identifier hs-var">isDigit</span></a></span></span><span> </span><span id="local-6989586621679487463"><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="#local-6989586621679487463"><span class="hs-identifier hs-var">valDigit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP a -&gt; ReadS a
forall a. ReadP a -&gt; ReadS a
</span><a href="Text.ParserCombinators.ReadP.html#readP_to_S"><span class="hs-identifier hs-var">readP_to_S</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; (Char -&gt; Bool) -&gt; (Char -&gt; Int) -&gt; ReadP a
forall a. Num a =&gt; a -&gt; (Char -&gt; Bool) -&gt; (Char -&gt; Int) -&gt; ReadP a
</span><a href="Text.Read.Lex.html#readIntP"><span class="hs-identifier hs-var">L.readIntP</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487465"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679487464"><span class="hs-identifier hs-var">isDigit</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="#local-6989586621679487463"><span class="hs-identifier hs-var">valDigit</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-comment">-- | Read an unsigned number in octal notation.</span><span>
</span><span id="line-88"></span><span class="hs-comment">--</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- &gt;&gt;&gt; readOct &quot;0644&quot;</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- [(420,&quot;&quot;)]</span><span>
</span><span id="line-91"></span><span id="local-6989586621679487571"><span class="annot"><a href="Numeric.html#readOct"><span class="hs-identifier hs-type">readOct</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487571"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487571"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier hs-type">ReadS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487571"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-92"></span><span id="readOct"><span class="annot"><span class="annottext">readOct :: forall a. (Eq a, Num a) =&gt; ReadS a
</span><a href="Numeric.html#readOct"><span class="hs-identifier hs-var hs-var">readOct</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP a -&gt; ReadS a
forall a. ReadP a -&gt; ReadS a
</span><a href="Text.ParserCombinators.ReadP.html#readP_to_S"><span class="hs-identifier hs-var">readP_to_S</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
forall a. (Eq a, Num a) =&gt; ReadP a
</span><a href="Text.Read.Lex.html#readOctP"><span class="hs-identifier hs-var">L.readOctP</span></a></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-comment">-- | Read an unsigned number in decimal notation.</span><span>
</span><span id="line-95"></span><span class="hs-comment">--</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- &gt;&gt;&gt; readDec &quot;0644&quot;</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- [(644,&quot;&quot;)]</span><span>
</span><span id="line-98"></span><span id="local-6989586621679487456"><span class="annot"><a href="Numeric.html#readDec"><span class="hs-identifier hs-type">readDec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487456"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487456"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier hs-type">ReadS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487456"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-99"></span><span id="readDec"><span class="annot"><span class="annottext">readDec :: forall a. (Eq a, Num a) =&gt; ReadS a
</span><a href="Numeric.html#readDec"><span class="hs-identifier hs-var hs-var">readDec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP a -&gt; ReadS a
forall a. ReadP a -&gt; ReadS a
</span><a href="Text.ParserCombinators.ReadP.html#readP_to_S"><span class="hs-identifier hs-var">readP_to_S</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
forall a. (Eq a, Num a) =&gt; ReadP a
</span><a href="Text.Read.Lex.html#readDecP"><span class="hs-identifier hs-var">L.readDecP</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-comment">-- | Read an unsigned number in hexadecimal notation.</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- Both upper or lower case letters are allowed.</span><span>
</span><span id="line-103"></span><span class="hs-comment">--</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- &gt;&gt;&gt; readHex &quot;deadbeef&quot;</span><span>
</span><span id="line-105"></span><span class="hs-comment">-- [(3735928559,&quot;&quot;)]</span><span>
</span><span id="line-106"></span><span id="local-6989586621679487450"><span class="annot"><a href="Numeric.html#readHex"><span class="hs-identifier hs-type">readHex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487450"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487450"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier hs-type">ReadS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487450"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-107"></span><span id="readHex"><span class="annot"><span class="annottext">readHex :: forall a. (Eq a, Num a) =&gt; ReadS a
</span><a href="Numeric.html#readHex"><span class="hs-identifier hs-var hs-var">readHex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP a -&gt; ReadS a
forall a. ReadP a -&gt; ReadS a
</span><a href="Text.ParserCombinators.ReadP.html#readP_to_S"><span class="hs-identifier hs-var">readP_to_S</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
forall a. (Eq a, Num a) =&gt; ReadP a
</span><a href="Text.Read.Lex.html#readHexP"><span class="hs-identifier hs-var">L.readHexP</span></a></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-comment">-- | Reads an /unsigned/ 'RealFrac' value,</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- expressed in decimal scientific notation.</span><span>
</span><span id="line-111"></span><span id="local-6989586621679487566"><span class="annot"><a href="Numeric.html#readFloat"><span class="hs-identifier hs-type">readFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Real.html#RealFrac"><span class="hs-identifier hs-type">RealFrac</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487566"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier hs-type">ReadS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487566"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-112"></span><span id="readFloat"><span class="annot"><span class="annottext">readFloat :: forall a. RealFrac a =&gt; ReadS a
</span><a href="Numeric.html#readFloat"><span class="hs-identifier hs-var hs-var">readFloat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP a -&gt; ReadS a
forall a. ReadP a -&gt; ReadS a
</span><a href="Text.ParserCombinators.ReadP.html#readP_to_S"><span class="hs-identifier hs-var">readP_to_S</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
forall a. RealFrac a =&gt; ReadP a
</span><a href="Numeric.html#readFloatP"><span class="hs-identifier hs-var">readFloatP</span></a></span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span id="local-6989586621679487564"><span class="annot"><a href="Numeric.html#readFloatP"><span class="hs-identifier hs-type">readFloatP</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Real.html#RealFrac"><span class="hs-identifier hs-type">RealFrac</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487564"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487564"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-115"></span><span id="readFloatP"><span class="annot"><span class="annottext">readFloatP :: forall a. RealFrac a =&gt; ReadP a
</span><a href="Numeric.html#readFloatP"><span class="hs-identifier hs-var hs-var">readFloatP</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-116"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487434"><span class="annot"><span class="annottext">Lexeme
</span><a href="#local-6989586621679487434"><span class="hs-identifier hs-var">tok</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lex"><span class="hs-identifier hs-var">L.lex</span></a></span><span>
</span><span id="line-117"></span><span>     </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Lexeme
</span><a href="#local-6989586621679487434"><span class="hs-identifier hs-var">tok</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-118"></span><span>       </span><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-type">L.Number</span></a></span><span> </span><span id="local-6989586621679487431"><span class="annot"><span class="annottext">Number
</span><a href="#local-6989586621679487431"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; ReadP a) -&gt; a -&gt; ReadP a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; a
forall a. Fractional a =&gt; Rational -&gt; a
</span><a href="GHC.Real.html#fromRational"><span class="hs-identifier hs-var">fromRational</span></a></span><span> </span><span class="annot"><span class="annottext">(Rational -&gt; a) -&gt; Rational -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Number -&gt; Rational
</span><a href="Text.Read.Lex.html#numberToRational"><span class="hs-identifier hs-var">L.numberToRational</span></a></span><span> </span><span class="annot"><span class="annottext">Number
</span><a href="#local-6989586621679487431"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-119"></span><span>       </span><span class="annot"><span class="annottext">Lexeme
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReadP a
forall a. ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="hs-comment">-- It's turgid to have readSigned work using list comprehensions,</span><span>
</span><span id="line-122"></span><span class="hs-comment">-- but it's specified as a ReadS to ReadS transformer</span><span>
</span><span id="line-123"></span><span class="hs-comment">-- With a bit of luck no one will use it.</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-comment">-- | Reads a /signed/ 'Real' value, given a reader for an unsigned value.</span><span>
</span><span id="line-126"></span><span id="local-6989586621679487552"><span class="annot"><a href="Numeric.html#readSigned"><span class="hs-identifier hs-type">readSigned</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Real"><span class="hs-identifier hs-type">Real</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487552"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier hs-type">ReadS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487552"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier hs-type">ReadS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487552"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-127"></span><span id="readSigned"><span class="annot"><span class="annottext">readSigned :: forall a. Real a =&gt; ReadS a -&gt; ReadS a
</span><a href="Numeric.html#readSigned"><span class="hs-identifier hs-var hs-var">readSigned</span></a></span></span><span> </span><span id="local-6989586621679487426"><span class="annot"><span class="annottext">ReadS a
</span><a href="#local-6989586621679487426"><span class="hs-identifier hs-var">readPos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ReadS a -&gt; ReadS a
forall a. Bool -&gt; ReadS a -&gt; ReadS a
</span><a href="GHC.Read.html#readParen"><span class="hs-identifier hs-var">readParen</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS a
</span><a href="#local-6989586621679487424"><span class="hs-identifier hs-var">read'</span></a></span><span>
</span><span id="line-128"></span><span>                     </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679487424"><span class="annot"><span class="annottext">read' :: ReadS a
</span><a href="#local-6989586621679487424"><span class="hs-identifier hs-var hs-var">read'</span></a></span></span><span> </span><span id="local-6989586621679487416"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487416"><span class="hs-identifier hs-var">r</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadS a
</span><a href="#local-6989586621679487415"><span class="hs-identifier hs-var">read''</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487416"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, String)] -&gt; [(a, String)] -&gt; [(a, String)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-129"></span><span>                                      </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span>
</span><span id="line-130"></span><span>                                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span class="hs-special">,</span><span id="local-6989586621679487414"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487414"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadS String
</span><a href="GHC.Read.html#lex"><span class="hs-identifier hs-var">lex</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487416"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-131"></span><span>                                        </span><span class="hs-special">(</span><span id="local-6989586621679487412"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487412"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487411"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487411"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadS a
</span><a href="#local-6989586621679487415"><span class="hs-identifier hs-var">read''</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487414"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-132"></span><span>                                        </span><span class="annot"><span class="annottext">(a, String) -&gt; [(a, String)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487412"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487411"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>                           </span><span id="local-6989586621679487415"><span class="annot"><span class="annottext">read'' :: ReadS a
</span><a href="#local-6989586621679487415"><span class="hs-identifier hs-var hs-var">read''</span></a></span></span><span> </span><span id="local-6989586621679487406"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487406"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-134"></span><span>                               </span><span class="hs-special">(</span><span id="local-6989586621679487405"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487405"><span class="hs-identifier hs-var">str</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487404"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487404"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadS String
</span><a href="GHC.Read.html#lex"><span class="hs-identifier hs-var">lex</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487406"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-135"></span><span>                               </span><span class="hs-special">(</span><span id="local-6989586621679487403"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487403"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadS a
</span><a href="#local-6989586621679487426"><span class="hs-identifier hs-var">readPos</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487405"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-136"></span><span>                               </span><span class="annot"><span class="annottext">(a, String) -&gt; [(a, String)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487403"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487404"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- Showing</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="hs-comment">-- | Show /non-negative/ 'Integral' numbers in base 10.</span><span>
</span><span id="line-142"></span><span id="local-6989586621679487547"><span class="annot"><a href="Numeric.html#showInt"><span class="hs-identifier hs-type">showInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487547"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487547"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-143"></span><span id="showInt"><span class="annot"><span class="annottext">showInt :: forall a. Integral a =&gt; a -&gt; ShowS
</span><a href="Numeric.html#showInt"><span class="hs-identifier hs-var hs-var">showInt</span></a></span></span><span> </span><span id="local-6989586621679487393"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487393"><span class="hs-identifier hs-var">n0</span></a></span></span><span> </span><span id="local-6989586621679487392"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487392"><span class="hs-identifier hs-var">cs0</span></a></span></span><span>
</span><span id="line-144"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487393"><span class="hs-identifier hs-var">n0</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Numeric.showInt: can't show negative numbers&quot;</span></span><span>
</span><span id="line-145"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ShowS
forall a. Integral a =&gt; a -&gt; ShowS
</span><a href="#local-6989586621679487389"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487393"><span class="hs-identifier hs-var">n0</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487392"><span class="hs-identifier hs-var">cs0</span></a></span><span>
</span><span id="line-146"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621679487389"><span class="annot"><span class="annottext">go :: t -&gt; ShowS
</span><a href="#local-6989586621679487389"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679487375"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487375"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679487374"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487374"><span class="hs-identifier hs-var">cs</span></a></span></span><span>
</span><span id="line-148"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487375"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">10</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Base.html#unsafeChr"><span class="hs-identifier hs-var">unsafeChr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487375"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-149"></span><span>            </span><span id="local-6989586621679487370"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621679487370"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#C%23"><span class="hs-identifier hs-type">C#</span></a></span><span> </span><span class="annot"><span class="annottext">Char#
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487370"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487374"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-150"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Base.html#unsafeChr"><span class="hs-identifier hs-var">unsafeChr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487369"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-151"></span><span>            </span><span id="local-6989586621679487368"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621679487368"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#C%23"><span class="hs-identifier hs-type">C#</span></a></span><span> </span><span class="annot"><span class="annottext">Char#
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">t -&gt; ShowS
</span><a href="#local-6989586621679487389"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487367"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487368"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487374"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-153"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679487367"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487367"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487369"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487369"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487375"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; (t, t)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="GHC.Real.html#quotRem"><span class="hs-operator hs-var">`quotRem`</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">10</span></span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span class="hs-comment">-- Controlling the format and precision of floats. The code that</span><span>
</span><span id="line-156"></span><span class="hs-comment">-- implements the formatting itself is in @PrelNum@ to avoid</span><span>
</span><span id="line-157"></span><span class="hs-comment">-- mutual module deps.</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Numeric.html#showEFloat"><span class="hs-pragma hs-type">showEFloat</span></a></span><span> </span><span class="hs-pragma">::</span><span>
</span><span id="line-160"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-pragma hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span>  </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-pragma hs-type">ShowS</span></a></span><span class="hs-pragma">,</span><span>
</span><span id="line-161"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-pragma hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-pragma hs-type">ShowS</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-162"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Numeric.html#showFFloat"><span class="hs-pragma hs-type">showFFloat</span></a></span><span> </span><span class="hs-pragma">::</span><span>
</span><span id="line-163"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-pragma hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span>  </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-pragma hs-type">ShowS</span></a></span><span class="hs-pragma">,</span><span>
</span><span id="line-164"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-pragma hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-pragma hs-type">ShowS</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-165"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Numeric.html#showGFloat"><span class="hs-pragma hs-type">showGFloat</span></a></span><span> </span><span class="hs-pragma">::</span><span>
</span><span id="line-166"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-pragma hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span>  </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-pragma hs-type">ShowS</span></a></span><span class="hs-pragma">,</span><span>
</span><span id="line-167"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-pragma hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-pragma hs-type">ShowS</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span class="hs-comment">-- | Show a signed 'RealFloat' value</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- using scientific (exponential) notation (e.g. @2.45e2@, @1.5e-3@).</span><span>
</span><span id="line-171"></span><span class="hs-comment">--</span><span>
</span><span id="line-172"></span><span class="hs-comment">-- In the call @'showEFloat' digs val@, if @digs@ is 'Nothing',</span><span>
</span><span id="line-173"></span><span class="hs-comment">-- the value is shown to full precision; if @digs@ is @'Just' d@,</span><span>
</span><span id="line-174"></span><span class="hs-comment">-- then at most @d@ digits after the decimal point are shown.</span><span>
</span><span id="line-175"></span><span id="local-6989586621679487535"><span class="annot"><a href="Numeric.html#showEFloat"><span class="hs-identifier hs-type">showEFloat</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487535"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487535"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-comment">-- | Show a signed 'RealFloat' value</span><span>
</span><span id="line-178"></span><span class="hs-comment">-- using standard decimal notation (e.g. @245000@, @0.0015@).</span><span>
</span><span id="line-179"></span><span class="hs-comment">--</span><span>
</span><span id="line-180"></span><span class="hs-comment">-- In the call @'showFFloat' digs val@, if @digs@ is 'Nothing',</span><span>
</span><span id="line-181"></span><span class="hs-comment">-- the value is shown to full precision; if @digs@ is @'Just' d@,</span><span>
</span><span id="line-182"></span><span class="hs-comment">-- then at most @d@ digits after the decimal point are shown.</span><span>
</span><span id="line-183"></span><span id="local-6989586621679487363"><span class="annot"><a href="Numeric.html#showFFloat"><span class="hs-identifier hs-type">showFFloat</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487363"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487363"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span class="hs-comment">-- | Show a signed 'RealFloat' value</span><span>
</span><span id="line-186"></span><span class="hs-comment">-- using standard decimal notation for arguments whose absolute value lies</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- between @0.1@ and @9,999,999@, and scientific notation otherwise.</span><span>
</span><span id="line-188"></span><span class="hs-comment">--</span><span>
</span><span id="line-189"></span><span class="hs-comment">-- In the call @'showGFloat' digs val@, if @digs@ is 'Nothing',</span><span>
</span><span id="line-190"></span><span class="hs-comment">-- the value is shown to full precision; if @digs@ is @'Just' d@,</span><span>
</span><span id="line-191"></span><span class="hs-comment">-- then at most @d@ digits after the decimal point are shown.</span><span>
</span><span id="line-192"></span><span id="local-6989586621679487362"><span class="annot"><a href="Numeric.html#showGFloat"><span class="hs-identifier hs-type">showGFloat</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487362"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487362"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span id="showEFloat"><span class="annot"><span class="annottext">showEFloat :: forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; ShowS
</span><a href="Numeric.html#showEFloat"><span class="hs-identifier hs-var hs-var">showEFloat</span></a></span></span><span> </span><span id="local-6989586621679487359"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487359"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679487358"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487358"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FFFormat -&gt; Maybe Int -&gt; a -&gt; String
forall a. RealFloat a =&gt; FFFormat -&gt; Maybe Int -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloat"><span class="hs-identifier hs-var">formatRealFloat</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFExponent"><span class="hs-identifier hs-var">FFExponent</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487359"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487358"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span id="showFFloat"><span class="annot"><span class="annottext">showFFloat :: forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; ShowS
</span><a href="Numeric.html#showFFloat"><span class="hs-identifier hs-var hs-var">showFFloat</span></a></span></span><span> </span><span id="local-6989586621679487352"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487352"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679487351"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487351"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FFFormat -&gt; Maybe Int -&gt; a -&gt; String
forall a. RealFloat a =&gt; FFFormat -&gt; Maybe Int -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloat"><span class="hs-identifier hs-var">formatRealFloat</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFFixed"><span class="hs-identifier hs-var">FFFixed</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487352"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487351"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span id="showGFloat"><span class="annot"><span class="annottext">showGFloat :: forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; ShowS
</span><a href="Numeric.html#showGFloat"><span class="hs-identifier hs-var hs-var">showGFloat</span></a></span></span><span> </span><span id="local-6989586621679487347"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487347"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679487346"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487346"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FFFormat -&gt; Maybe Int -&gt; a -&gt; String
forall a. RealFloat a =&gt; FFFormat -&gt; Maybe Int -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloat"><span class="hs-identifier hs-var">formatRealFloat</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFGeneric"><span class="hs-identifier hs-var">FFGeneric</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487347"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487346"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span class="hs-comment">-- | Show a signed 'RealFloat' value</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- using standard decimal notation (e.g. @245000@, @0.0015@).</span><span>
</span><span id="line-200"></span><span class="hs-comment">--</span><span>
</span><span id="line-201"></span><span class="hs-comment">-- This behaves as 'showFFloat', except that a decimal point</span><span>
</span><span id="line-202"></span><span class="hs-comment">-- is always guaranteed, even if not needed.</span><span>
</span><span id="line-203"></span><span class="hs-comment">--</span><span>
</span><span id="line-204"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-205"></span><span id="local-6989586621679487344"><span class="annot"><a href="Numeric.html#showFFloatAlt"><span class="hs-identifier hs-type">showFFloatAlt</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487344"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487344"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="hs-comment">-- | Show a signed 'RealFloat' value</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- using standard decimal notation for arguments whose absolute value lies</span><span>
</span><span id="line-209"></span><span class="hs-comment">-- between @0.1@ and @9,999,999@, and scientific notation otherwise.</span><span>
</span><span id="line-210"></span><span class="hs-comment">--</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- This behaves as 'showFFloat', except that a decimal point</span><span>
</span><span id="line-212"></span><span class="hs-comment">-- is always guaranteed, even if not needed.</span><span>
</span><span id="line-213"></span><span class="hs-comment">--</span><span>
</span><span id="line-214"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-215"></span><span id="local-6989586621679487343"><span class="annot"><a href="Numeric.html#showGFloatAlt"><span class="hs-identifier hs-type">showGFloatAlt</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487343"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487343"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-216"></span><span>
</span><span id="line-217"></span><span id="showFFloatAlt"><span class="annot"><span class="annottext">showFFloatAlt :: forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; ShowS
</span><a href="Numeric.html#showFFloatAlt"><span class="hs-identifier hs-var hs-var">showFFloatAlt</span></a></span></span><span> </span><span id="local-6989586621679487340"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487340"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679487339"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487339"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FFFormat -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; String
forall a.
RealFloat a =&gt;
FFFormat -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloatAlt"><span class="hs-identifier hs-var">formatRealFloatAlt</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFFixed"><span class="hs-identifier hs-var">FFFixed</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487340"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487339"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span id="showGFloatAlt"><span class="annot"><span class="annottext">showGFloatAlt :: forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; ShowS
</span><a href="Numeric.html#showGFloatAlt"><span class="hs-identifier hs-var hs-var">showGFloatAlt</span></a></span></span><span> </span><span id="local-6989586621679487335"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487335"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679487334"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487334"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FFFormat -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; String
forall a.
RealFloat a =&gt;
FFFormat -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloatAlt"><span class="hs-identifier hs-var">formatRealFloatAlt</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFGeneric"><span class="hs-identifier hs-var">FFGeneric</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679487335"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487334"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="hs-comment">{- | Show a floating-point value in the hexadecimal format,
similar to the @%a@ specifier in C's printf.

  &gt;&gt;&gt; showHFloat (212.21 :: Double) &quot;&quot;
  &quot;0x1.a86b851eb851fp7&quot;
  &gt;&gt;&gt; showHFloat (-12.76 :: Float) &quot;&quot;
  &quot;-0x1.9851ecp3&quot;
  &gt;&gt;&gt; showHFloat (-0 :: Double) &quot;&quot;
  &quot;-0x0p+0&quot;
-}</span><span>
</span><span id="line-230"></span><span id="local-6989586621679487526"><span class="annot"><a href="Numeric.html#showHFloat"><span class="hs-identifier hs-type">showHFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487526"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487526"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-231"></span><span id="showHFloat"><span class="annot"><span class="annottext">showHFloat :: forall a. RealFloat a =&gt; a -&gt; ShowS
</span><a href="Numeric.html#showHFloat"><span class="hs-identifier hs-var hs-var">showHFloat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ShowS) -&gt; (a -&gt; String) -&gt; a -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; String
forall {a}. RealFloat a =&gt; a -&gt; String
</span><a href="#local-6989586621679487330"><span class="hs-identifier hs-var">fmt</span></a></span><span>
</span><span id="line-232"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-233"></span><span>  </span><span id="local-6989586621679487330"><span class="annot"><span class="annottext">fmt :: a -&gt; String
</span><a href="#local-6989586621679487330"><span class="hs-identifier hs-var hs-var">fmt</span></a></span></span><span> </span><span id="local-6989586621679487312"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487312"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-234"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNaN"><span class="hs-identifier hs-var">isNaN</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487312"><span class="hs-identifier hs-var">x</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NaN&quot;</span></span><span>
</span><span id="line-235"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isInfinite"><span class="hs-identifier hs-var">isInfinite</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487312"><span class="hs-identifier hs-var">x</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487312"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Infinity&quot;</span></span><span>
</span><span id="line-236"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487312"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-var">isNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487312"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; String
forall {a}. RealFloat a =&gt; a -&gt; String
</span><a href="#local-6989586621679487307"><span class="hs-identifier hs-var">cvt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487312"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-237"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; String
forall {a}. RealFloat a =&gt; a -&gt; String
</span><a href="#local-6989586621679487307"><span class="hs-identifier hs-var">cvt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487312"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span>  </span><span id="local-6989586621679487307"><span class="annot"><span class="annottext">cvt :: a -&gt; String
</span><a href="#local-6989586621679487307"><span class="hs-identifier hs-var hs-var">cvt</span></a></span></span><span> </span><span id="local-6989586621679487280"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487280"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-240"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487280"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0x0p+0&quot;</span></span><span>
</span><span id="line-241"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-242"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; a -&gt; ([Int], Int)
forall a. RealFloat a =&gt; Integer -&gt; a -&gt; ([Int], Int)
</span><a href="GHC.Float.html#floatToDigits"><span class="hs-identifier hs-var">floatToDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487280"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-243"></span><span>        </span><span id="local-6989586621679487279"><span class="annot"><span class="annottext">r :: ([Int], Int)
</span><a href="#local-6989586621679487279"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Impossible happened: showHFloat: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">([Int], Int) -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">([Int], Int)
</span><a href="#local-6989586621679487279"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-244"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679487276"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487276"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679487275"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679487275"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679487274"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487274"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0x&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487276"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; String
forall {a}. (Integral a, Show a) =&gt; [a] -&gt; String
</span><a href="#local-6989586621679487273"><span class="hs-identifier hs-var">frac</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679487275"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;p&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487274"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span>  </span><span class="hs-comment">-- Given binary digits, convert them to hex in blocks of 4</span><span>
</span><span id="line-247"></span><span>  </span><span class="hs-comment">-- Special case: If all 0's, just drop it.</span><span>
</span><span id="line-248"></span><span>  </span><span id="local-6989586621679487273"><span class="annot"><span class="annottext">frac :: [a] -&gt; String
</span><a href="#local-6989586621679487273"><span class="hs-identifier hs-var hs-var">frac</span></a></span></span><span> </span><span id="local-6989586621679487262"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487262"><span class="hs-identifier hs-var">digits</span></a></span></span><span>
</span><span id="line-249"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Bool
forall {a}. (Eq a, Num a) =&gt; [a] -&gt; Bool
</span><a href="#local-6989586621679487261"><span class="hs-identifier hs-var">allZ</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487262"><span class="hs-identifier hs-var">digits</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-250"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; String
forall {a}. (Integral a, Show a) =&gt; [a] -&gt; String
</span><a href="#local-6989586621679487260"><span class="hs-identifier hs-var">hex</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487262"><span class="hs-identifier hs-var">digits</span></a></span><span>
</span><span id="line-251"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-252"></span><span>    </span><span id="local-6989586621679487260"><span class="annot"><span class="annottext">hex :: [a] -&gt; String
</span><a href="#local-6989586621679487260"><span class="hs-identifier hs-var hs-var">hex</span></a></span></span><span> </span><span id="local-6989586621679487241"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487241"><span class="hs-identifier hs-var">ds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-253"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487241"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-254"></span><span>        </span><span class="hs-special">[</span><span class="hs-special">]</span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-255"></span><span>        </span><span class="hs-special">[</span><span id="local-6989586621679487240"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487240"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">]</span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a -&gt; a -&gt; ShowS
forall {a}. (Integral a, Show a) =&gt; a -&gt; a -&gt; a -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679487239"><span class="hs-identifier hs-var">hexDigit</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487240"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-256"></span><span>        </span><span class="hs-special">[</span><span id="local-6989586621679487238"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487238"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487237"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487237"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">]</span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a -&gt; a -&gt; ShowS
forall {a}. (Integral a, Show a) =&gt; a -&gt; a -&gt; a -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679487239"><span class="hs-identifier hs-var">hexDigit</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487238"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487237"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-257"></span><span>        </span><span class="hs-special">[</span><span id="local-6989586621679487236"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487236"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487235"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487235"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487234"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487234"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">]</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a -&gt; a -&gt; ShowS
forall {a}. (Integral a, Show a) =&gt; a -&gt; a -&gt; a -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679487239"><span class="hs-identifier hs-var">hexDigit</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487236"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487235"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487234"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-258"></span><span>        </span><span id="local-6989586621679487233"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487233"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679487232"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487232"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679487231"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487231"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679487230"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487230"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679487229"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487229"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a -&gt; a -&gt; ShowS
forall {a}. (Integral a, Show a) =&gt; a -&gt; a -&gt; a -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679487239"><span class="hs-identifier hs-var">hexDigit</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487233"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487232"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487231"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487230"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; String
</span><a href="#local-6989586621679487260"><span class="hs-identifier hs-var">hex</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487229"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span>  </span><span id="local-6989586621679487239"><span class="annot"><span class="annottext">hexDigit :: a -&gt; a -&gt; a -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679487239"><span class="hs-identifier hs-var hs-var">hexDigit</span></a></span></span><span> </span><span id="local-6989586621679487213"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487213"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679487212"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487212"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679487211"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487211"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679487210"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487210"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ShowS
forall a. (Integral a, Show a) =&gt; a -&gt; ShowS
</span><a href="Numeric.html#showHex"><span class="hs-identifier hs-var">showHex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">8</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487213"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">4</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487212"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487211"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487210"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span>  </span><span id="local-6989586621679487261"><span class="annot"><span class="annottext">allZ :: [a] -&gt; Bool
</span><a href="#local-6989586621679487261"><span class="hs-identifier hs-var hs-var">allZ</span></a></span></span><span> </span><span id="local-6989586621679487204"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487204"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487204"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-263"></span><span>              </span><span id="local-6989586621679487203"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487203"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679487202"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487202"><span class="hs-identifier hs-var">more</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487203"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Bool
</span><a href="#local-6989586621679487261"><span class="hs-identifier hs-var">allZ</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487202"><span class="hs-identifier hs-var">more</span></a></span><span>
</span><span id="line-264"></span><span>              </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-267"></span><span class="hs-comment">-- Integer printing functions</span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span class="hs-comment">-- | Shows a /non-negative/ 'Integral' number using the base specified by the</span><span>
</span><span id="line-270"></span><span class="hs-comment">-- first argument, and the character representation specified by the second.</span><span>
</span><span id="line-271"></span><span id="local-6989586621679487504"><span class="annot"><a href="Numeric.html#showIntAtBase"><span class="hs-identifier hs-type">showIntAtBase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487504"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487504"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487504"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487504"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-272"></span><span id="showIntAtBase"><span class="annot"><span class="annottext">showIntAtBase :: forall a. (Integral a, Show a) =&gt; a -&gt; (Int -&gt; Char) -&gt; a -&gt; ShowS
</span><a href="Numeric.html#showIntAtBase"><span class="hs-identifier hs-var hs-var">showIntAtBase</span></a></span></span><span> </span><span id="local-6989586621679487187"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487187"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679487186"><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="#local-6989586621679487186"><span class="hs-identifier hs-var">toChr</span></a></span></span><span> </span><span id="local-6989586621679487185"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487185"><span class="hs-identifier hs-var">n0</span></a></span></span><span> </span><span id="local-6989586621679487184"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487184"><span class="hs-identifier hs-var">r0</span></a></span></span><span>
</span><span id="line-273"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487187"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Numeric.showIntAtBase: applied to unsupported base &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487187"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487185"><span class="hs-identifier hs-var">n0</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Numeric.showIntAtBase: applied to negative number &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487185"><span class="hs-identifier hs-var">n0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, a) -&gt; ShowS
</span><a href="#local-6989586621679487182"><span class="hs-identifier hs-var">showIt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; (a, a)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="GHC.Real.html#quotRem"><span class="hs-identifier hs-var">quotRem</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487185"><span class="hs-identifier hs-var">n0</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487187"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487184"><span class="hs-identifier hs-var">r0</span></a></span><span>
</span><span id="line-276"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-277"></span><span>    </span><span id="local-6989586621679487182"><span class="annot"><span class="annottext">showIt :: (a, a) -&gt; ShowS
</span><a href="#local-6989586621679487182"><span class="hs-identifier hs-var hs-var">showIt</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679487178"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487178"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487177"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487177"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679487176"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487176"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-identifier hs-var">seq</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487175"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-comment">-- stricter than necessary</span><span>
</span><span id="line-278"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487178"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-279"></span><span>        </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487174"><span class="hs-identifier hs-var">r'</span></a></span><span>
</span><span id="line-280"></span><span>        </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(a, a) -&gt; ShowS
</span><a href="#local-6989586621679487182"><span class="hs-identifier hs-var">showIt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; (a, a)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="GHC.Real.html#quotRem"><span class="hs-identifier hs-var">quotRem</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487178"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487187"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487174"><span class="hs-identifier hs-var">r'</span></a></span><span>
</span><span id="line-281"></span><span>     </span><span class="hs-keyword">where</span><span>
</span><span id="line-282"></span><span>      </span><span id="local-6989586621679487175"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621679487175"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="#local-6989586621679487186"><span class="hs-identifier hs-var">toChr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487177"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-283"></span><span>      </span><span id="local-6989586621679487174"><span class="annot"><span class="annottext">r' :: String
</span><a href="#local-6989586621679487174"><span class="hs-identifier hs-var hs-var">r'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487175"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487176"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span class="hs-comment">-- | Show /non-negative/ 'Integral' numbers in base 16.</span><span>
</span><span id="line-286"></span><span id="local-6989586621679487505"><span class="annot"><a href="Numeric.html#showHex"><span class="hs-identifier hs-type">showHex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487505"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487505"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487505"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-287"></span><span id="showHex"><span class="annot"><span class="annottext">showHex :: forall a. (Integral a, Show a) =&gt; a -&gt; ShowS
</span><a href="Numeric.html#showHex"><span class="hs-identifier hs-var hs-var">showHex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Int -&gt; Char) -&gt; a -&gt; ShowS
forall a. (Integral a, Show a) =&gt; a -&gt; (Int -&gt; Char) -&gt; a -&gt; ShowS
</span><a href="Numeric.html#showIntAtBase"><span class="hs-identifier hs-var">showIntAtBase</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">16</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Show.html#intToDigit"><span class="hs-identifier hs-var">intToDigit</span></a></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="hs-comment">-- | Show /non-negative/ 'Integral' numbers in base 8.</span><span>
</span><span id="line-290"></span><span id="local-6989586621679487163"><span class="annot"><a href="Numeric.html#showOct"><span class="hs-identifier hs-type">showOct</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487163"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679487163"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679487163"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-291"></span><span id="showOct"><span class="annot"><span class="annottext">showOct :: forall a. (Integral a, Show a) =&gt; a -&gt; ShowS
</span><a href="Numeric.html#showOct"><span class="hs-identifier hs-var hs-var">showOct</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Int -&gt; Char) -&gt; a -&gt; ShowS
forall a. (Integral a, Show a) =&gt; a -&gt; (Int -&gt; Char) -&gt; a -&gt; ShowS
</span><a href="Numeric.html#showIntAtBase"><span class="hs-identifier hs-var">showIntAtBase</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">8</span></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Show.html#intToDigit"><span class="hs-identifier hs-var">intToDigit</span></a></span><span>
</span><span id="line-292"></span></pre></body></html>